package com.techwells.learningkites.model;

import java.util.List;

import android.R.integer;

import com.techwells.learningkites.base.KitesViewModel;
import com.techwells.learningkites.networkservice.KitesServiceMediator;
import com.techwells.learningkites.networkservice.model.Segment;
import com.techwells.learningkites.networkservice.model.Sentences;
import com.techwells.learningkites.networkservice.model.Test;
import com.techwells.learningkites.networkservice.model.User;
import com.techwells.learningkites.networkservice.model.Word;
import com.techwells.taco.tasktool.TaskToken;

public class SegmentDetailViewModel extends KitesViewModel {

	public Segment segment;
	public List<Word> wordList;
	public List<Sentences> sentenceList;
	public List<Test> testList;
	public int returnCode,wordReturnCode;
	public String resourceCache;
	
	@Override
	public void paddingResult(TaskToken token) {
		// TODO Auto-generated method stub
		super.paddingResult(token);
		String method = token.method;
		if (method.equals(KitesServiceMediator.SERVICE_GET_VIDEO_SEGMENT_DETAILS)) {
			segment = (Segment) response.getResponse();
		}else if (method.equals(KitesServiceMediator.SERVICE_GET_VIDEO_SEGMENT_WORDS)) {
			wordList = (List<Word>) response.getResponse();
		}else if (method.equals(KitesServiceMediator.SERVICE_GET_VIDEO_SEGMENT_SENTENCES)) {
			sentenceList = (List<Sentences>) response.getResponse();
		}else if (method.equals(KitesServiceMediator.SERVICE_GET_VIDEO_SEGMENT_EXAMS)) {
			testList = (List<Test>) response.getResponse();
		}else if (method.equals(KitesServiceMediator.SERVICE_DO_VIDEO_SENTENCE)) {
			returnCode = (int) response.getReturnCode();
		}else if (method.equals(KitesServiceMediator.SERVICE_ADD_WORDS)) {
			wordReturnCode = (int) response.getReturnCode();
		}else if (method.equals(KitesServiceMediator.SERVICE_GET_VIDEO_STREAM)) {
			resourceCache = (String) response.getResponse();
		}
	}
	
	
	

}
